<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>商品列表</title>
	<script type='text/javascript' src='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/Git-SHOP/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/Git-SHOP';
WEB = 'http://localhost/Git-SHOP/index.php';
URL = 'http://localhost/Git-SHOP/index.php/Admin/Goods/index/page/4';
APP = 'http://localhost/Git-SHOP/HSHOP';
COMMON = 'http://localhost/Git-SHOP/HSHOP/Common';
HDPHP = 'http://localhost/Git-SHOP/hdphp/hdphp';
HDPHPDATA = 'http://localhost/Git-SHOP/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/Git-SHOP/hdphp/hdphp/Extend';
MODULE = 'http://localhost/Git-SHOP/index.php/Admin';
CONTROLLER = 'http://localhost/Git-SHOP/index.php/Admin/Goods';
ACTION = 'http://localhost/Git-SHOP/index.php/Admin/Goods/index';
STATIC = 'http://localhost/Git-SHOP/Static';
HDPHPTPL = 'http://localhost/Git-SHOP/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/Git-SHOP/HSHOP/Admin/View';
PUBLIC = 'http://localhost/Git-SHOP/HSHOP/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/Git-SHOP/HSHOP/Admin/View/Goods';
HISTORY = 'http://localhost/Git-SHOP/index.php/Admin/Goods/index';
</script>
</head>
<body>
<div class='wrap'>
		<div class='menu_list'>
			<ul>
				<li>
					<a href="<?php echo U('add');?>">添加商品</a>
				</li>
			</ul>
		</div>
		<table class='table2'>
			<thead>
				<tr>
					<td class='w50'>商品GID</td>
					<td>商品名称</td>
					<td>栏目</td>				
					<td>品牌</td>
					<td>货号</td>
					<td>商城价格</td>
					<td>数量</td>
					<td>上架</td>
					<td>热门</td>
			        <td>新品</td>
					<td class='w100'>操作</td>
				</tr>
			</thead>
			<tbody>
				<?php $hd["list"]["d"]["total"]=0;if(isset($data) && !empty($data)):$_id_d=0;$_index_d=0;$lastd=min(1000,count($data));
$hd["list"]["d"]["first"]=true;
$hd["list"]["d"]["last"]=false;
$_total_d=ceil($lastd/1);$hd["list"]["d"]["total"]=$_total_d;
$_data_d = array_slice($data,0,$lastd);
if(count($_data_d)==0):echo "";
else:
foreach($_data_d as $key=>$d):
if(($_id_d)%1==0):$_id_d++;else:$_id_d++;continue;endif;
$hd["list"]["d"]["index"]=++$_index_d;
if($_index_d>=$_total_d):$hd["list"]["d"]["last"]=true;endif;?>

					<tr style="height:60px">
						<td><?php echo $d['gid'];?></td>
						<td><?php echo $d['goods_name'];?></td>
						<td><?php echo $d['cat_name'];?></td>
						<td><?php echo $d['brand_name'];?></td>
						<td><?php echo $d['goods_sn'];?></td>
						<td><?php echo $d['goods_price'];?></td>
						<td><?php echo $d['goods_number'];?></td>
						<td><?php echo $d['is_on_sale_text'];?></td>
						<td><?php if($d['is_hot']){?>√<?php  }else{ ?>×<?php }?></td>
			            <td><?php if($d['is_new']){?>√<?php  }else{ ?>×<?php }?></td>
						<td>
							<a href="<?php echo U('edit',array('gid'=>$d['gid']));?>">编辑</a> |
							<a href="<?php echo U('del',array('gid'=>$d['gid']));?>" onclick='return confirm("确定删除商品吗")'>删除</a>
							<a href="<?php echo U('product/manage',array('goods_gid'=>$d['gid']));?>">货品</a>
						</td>
					</tr>
				<?php $hd["list"]["d"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			</tbody>
		</table>
	<div class='page1'><?php echo $page;?></div>	
</div>
</body>
</html>